package com.ruoyi.outpatient.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.outpatient.mapper.MedicalCostOutpatientInfoMapper;
import com.ruoyi.outpatient.domain.MedicalCostOutpatientInfo;
import com.ruoyi.outpatient.service.IMedicalCostOutpatientInfoService;

/**
 * 门诊卡信息Service业务层处理
 * 
 * @author yyj
 * @date 2022-01-04
 */
@Service
public class MedicalCostOutpatientInfoServiceImpl implements IMedicalCostOutpatientInfoService 
{
    @Autowired
    private MedicalCostOutpatientInfoMapper medicalCostOutpatientInfoMapper;

    /**
     * 查询门诊卡信息
     * 
     * @param id 门诊卡信息主键
     * @return 门诊卡信息
     */
    @Override
    public MedicalCostOutpatientInfo selectMedicalCostOutpatientInfoById(Long id)
    {
        return medicalCostOutpatientInfoMapper.selectMedicalCostOutpatientInfoById(id);
    }

    /**
     * 查询门诊卡信息列表
     * 
     * @param medicalCostOutpatientInfo 门诊卡信息
     * @return 门诊卡信息
     */
    @Override
    public List<MedicalCostOutpatientInfo> selectMedicalCostOutpatientInfoList(MedicalCostOutpatientInfo medicalCostOutpatientInfo)
    {
        return medicalCostOutpatientInfoMapper.selectMedicalCostOutpatientInfoList(medicalCostOutpatientInfo);
    }

    /**
     * 新增门诊卡信息
     * 
     * @param medicalCostOutpatientInfo 门诊卡信息
     * @return 结果
     */
    @Override
    public int insertMedicalCostOutpatientInfo(MedicalCostOutpatientInfo medicalCostOutpatientInfo)
    {
        medicalCostOutpatientInfo.setId(new Date().getTime());
        return medicalCostOutpatientInfoMapper.insertMedicalCostOutpatientInfo(medicalCostOutpatientInfo);
    }

    /**
     * 修改门诊卡信息
     * 
     * @param medicalCostOutpatientInfo 门诊卡信息
     * @return 结果
     */
    @Override
    public int updateMedicalCostOutpatientInfo(MedicalCostOutpatientInfo medicalCostOutpatientInfo)
    {
        return medicalCostOutpatientInfoMapper.updateMedicalCostOutpatientInfo(medicalCostOutpatientInfo);
    }

    /**
     * 批量删除门诊卡信息
     * 
     * @param ids 需要删除的门诊卡信息主键
     * @return 结果
     */
    @Override
    public int deleteMedicalCostOutpatientInfoByIds(Long[] ids)
    {
        return medicalCostOutpatientInfoMapper.deleteMedicalCostOutpatientInfoByIds(ids);
    }

    /**
     * 删除门诊卡信息信息
     * 
     * @param id 门诊卡信息主键
     * @return 结果
     */
    @Override
    public int deleteMedicalCostOutpatientInfoById(Long id)
    {
        return medicalCostOutpatientInfoMapper.deleteMedicalCostOutpatientInfoById(id);
    }
}
